package org.flashIso.engine.library.objects
{
	import flash.utils.ByteArray;
	import flash.utils.getQualifiedClassName;
	
	import org.flashIso.engine.core.ILibrary;
	import org.flashIso.engine.core.ISerializableXML;
	import org.flashIso.engine.core.ValidateableObject;
	
	public class LBase extends ValidateableObject implements ISerializableXML
	{
		private var _id:String;
		
		public function get id() : String {
			return _id;
		}
		public function set id(value : String) : void {
			if (_id != value){
				_id = value;
				triggerValidation();
			}
		}
		public function toXML() : XML {
			var xml:XML = new XML("<" + className + "  />");
			
			xml.@id = id;
			return xml;
		}
		
		public function fromXML(xml:XML, library:ILibrary = null) : void {
			id = xml.@id + "";
		}
		
	}
}